home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 26 (Anniversary Edition)
/
Volume 26 [Anniversary Edition] - JOGO DISK .iso
/
DEPOSITO
/
REmovido
/
Puzzle
/
yeti.swf
/
scripts
/
__Packages
/
CIndicator.as
< prev
next >
Wrap
Text File
|
2006-06-07
|
886b
|
40 lines
class CIndicator extends MovieClip
{
function CIndicator()
{
super();
}
function init(maxValue_)
{
var _loc1_ = this;
_loc1_.maxValue = maxValue_;
_loc1_.curValue = 0;
_loc1_.startY = _loc1_.mc_mask._y;
_loc1_.updateView();
}
function addValue(val)
{
var _loc1_ = this;
_loc1_.curValue += val;
if(_loc1_.curValue > _loc1_.maxValue)
{
_loc1_.curValue = _loc1_.maxValue;
}
_loc1_.updateView();
}
function reset()
{
this.curValue = 0;
this.updateView();
}
function isFull()
{
return this.curValue >= this.maxValue;
}
function updateView()
{
var _loc1_ = this;
_loc1_.mc_mask._y = _loc1_.startY + _loc1_.mc_mask._height - _loc1_.curValue / _loc1_.maxValue * _loc1_.mc_mask._height;
}
}